

function addSensorbitCod(Blockly) {




    //倾斜传感器模块
   Blockly.Python.microbit_tilt = function(block) {
    var dropdown_tilt = this.getFieldValue('tilt');
    Blockly.Python.definitions_['import_microbit'] = 'from microbit import *';
    Blockly.Python.definitions_['import_tilt'] = 'from sensor import tilt_switch';
    var code = "tilt_switch.is_tilted("+ dropdown_tilt +")";
    return [code];
  }

    return Blockly;
}

module.exports = addSensorbitCod;

